package com.hutianao.gqgl.organ.respository;

import com.hutianao.gqgl.mybatis.entity.PtOrganEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.organ.entity.OrganTree;
import com.hutianao.gqgl.organ.entity.SearchOrganEntity;
import com.hutianao.gqgl.organ.entity.SearchResultEntity;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface OrganDao {
    int addOrganInfo(PtOrganEntity ptOrganEntity);

    List<OrganTree> getAllOrgan();

    List<PtOrganEntity> queryOrganInfoListByPage(@Param( "search") SearchOrganEntity search, @Param("padding") PaddingEntity padding);

    Integer queryOrganInfoTotal(@Param( "search") SearchOrganEntity search);

    Integer organBind(@Param( "id") String id,@Param( "pId") String pId);

    void organUpdate(@Param( "id") String id, @Param( "name") String organCurrentName);

    PtOrganEntity selectOrganByName(@Param( "name") String name);

    List<SearchResultEntity> listDepartmentByName(@Param( "search") SearchOrganEntity search, @Param("padding") PaddingEntity padding);
    Integer countDepartmentByName(@Param( "search") SearchOrganEntity search);
    List<SearchResultEntity> listDutyByName(@Param( "search") SearchOrganEntity search, @Param("padding") PaddingEntity padding);
    Integer countDutyByName(@Param( "search") SearchOrganEntity search);

    List<SearchResultEntity> listOrganByName(@Param( "search") SearchOrganEntity search, @Param("padding") PaddingEntity padding);
    Integer countOrganByName(@Param( "search") SearchOrganEntity search);

    void deleteOrganById(@Param("organUuids")String[] organUuids);

     int countReference(@Param("organUuids") String[] organUuids);

     void updateOrganInfo(PtOrganEntity ptOrganEntity);

     PtOrganEntity queryOrganListById(@Param("organUuid")String organUuid);
}
